package scalaLearning.part5

object GenericUpBound {

    def say[A <: Person1](a: A): Unit = {
      println(a.getClass)
    }

    def main(args: Array[String]): Unit = {
      val s = new Student1
      val t = new Teacher1
      say(s)
      say(t)
    }

}

class Person1

class Student1 extends Person1

class Teacher1 extends Person1